/**
/**
 * JAVACC DEMO 1.0
 */
package freemarker.core;

import java.io.IOException;

import freemarker.core.Environment;
import freemarker.core.Macro;
import freemarker.core.TemplateElement;
import freemarker.template.TemplateException;

/**
 * description:  
 * @author Hou Dayu 创建时间：2016-7-28
 */
public class MacroWrapper extends TemplateElement {

	Macro macro;

	public MacroWrapper(Macro macro) {
		this.macro = macro;
	}

	public void accept(Environment env) throws TemplateException, IOException {
		EnvironmentWrapper environmentWrapper = new EnvironmentWrapper(env);
		environmentWrapper.visitMacroDef(macro);
	}

	public String getDescription() {
		return macro.getDescription();
	}

	public String getCanonicalForm() {
		return macro.getCanonicalForm();
	}
}
